import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.Scanner;

public class JDBCDemo3 {
    public static void main(String[] args) throws SQLException {

        Scanner scanner = new Scanner(System.in);

        DataSource dataSource = new MysqlDataSource();
        ((MysqlDataSource)dataSource).setUrl();
        ((MysqlDataSource)dataSource).setUser();
        ((MysqlDataSource)dataSource).setPassword();


        Connection connection = dataSource.getConnection();

        String sql = "";
        PreparedStatement preparedStatement = connection.prepareStatement(sql);
        String date = " ";
        preparedStatement.setString(1 , date);

        int n = preparedStatement.executeUpdate();
        System.out.println(n);

        preparedStatement.close();
        connection.close();


    }
}
